﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CS322_V8
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnVreme_Click(object sender, EventArgs e)
        {
            Time time = new Time(DateTime.Now);
            lblVreme.Text = time.prikaziVreme();

        }

        private void btnStudent_Click(object sender, EventArgs e)
        {
            //Create Student.
            Student student1 = new Student("abc", "pqr", "xyz");
            //Clone Student1.
            Student student2 = (Student)student1.Clone();
            //Here you can see it gives same value.
            Console.WriteLine("Before we change student1s first name");
            Console.WriteLine(student1.FirstName + " " + student2.FirstName);
            //By changing one objects property, you can understand they are not same reference.
            student1.FirstName = "ABC";
            Console.WriteLine("After we changed student1s first name");
            Console.WriteLine(student1.FirstName + " " + student2.FirstName);


            C c = new C();
            Console.WriteLine("Object Created ");
            Console.WriteLine("Press enter to Destroy it");
            Console.ReadLine();
            c = null;
            //GC.Collect();

            Console.Read();
           

        }

    }
}
